<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/purchase.js" ></script>
<title>查看采购单</title>
<style>
.p_del{height:14px; width:14px;background:url(/fuman/images/no.gif) no-repeat;text-decoration:none;}
.p_img{width:100px;}
#search_rs{width:800px;position:absolute;background:#fff;border:1px solid gray;}
#search_rs .thead td{background:gray;color:#fff;}
#search_rs td{background:#f1f1f1;}
#search_rs img{height:30px;}
.price{width:60px;height:22px;border:1px solid #A6A6A6;line-height:22px;padding:0 0 0 2px;font-size:14px;line-height:20px;}
.num{width:60px;height:22px;border:1px solid #A6A6A6;line-height:22px;padding:0 0 0 2px;font-size:14px;line-height:20px;}
.total{width:60px;height:22px;border:1px solid #A6A6A6;line-height:22px;padding:0 0 0 2px;font-size:14px;line-height:20px;}
</style>
<script language="javascript">

</script>
<body class="withvernav">
<div class="bodywrapper">
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">查看采购单</h1>
      <span class="pagedesc"></span>
      <div class="menulist">
        <ul class="profile_summary">
         
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
        <form class="stdform stdform2"  id="goodsForm" method="post" action="/purchase/savepurchase">
        <input type="hidden" name="pid" value="{{$detail.id}}">
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th colspan="2" class="head1">采购单信息</th>
              </tr>
            </thead>
          </table>
         
           <br>
            <input type="hidden" id="hidden_data" value="" />
         
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;" id="purchase_list">
          <thead>
  

            <tr>
              <td height="35" width="10%"  bgcolor="#FEFFF1"><b>商品图片</b></td>
              <td  bgcolor="#FEFFF1"><b>商品名称</b></td>
              <td width="15%" bgcolor="#FEFFF1"><b>商品编号</b></td>
              <td width="7%" bgcolor="#FEFFF1"><strong>采购点</strong></td>
              <td width="9%" bgcolor="#FEFFF1"><strong>本次采购价</strong></td>
              <td width="8%" bgcolor="#FEFFF1"><b>数量</b></td>
              {{if $detail.chkflag==1}}
               <td width="7%" bgcolor="#FEFFF1"><strong>质检数</strong></td>{{/if}}
              
              <td width="7%" bgcolor="#FEFFF1"><strong>合计金额</strong></td>
              <td width="7%" bgcolor="#FEFFF1"><strong>当前库存</strong></td>
             <td width="7%" bgcolor="#FEFFF1"><strong>标识</strong></td>
             <td width="10%" bgcolor="#FEFFF1"><strong>备注</strong></td>
            </tr>
            </thead>
             {{foreach from=$detail_list item=li key=key}}
            <tr>
             
              <td width="32%" bgcolor="#FFFFFF"><div class="lbt"><a href="{{$li.imagesurl}}" target="_blank"><img src={{$li.imagesurl}} width="60" height="60"></a></div>
                  <div class="lbcp"><input  type="hidden"  readonly="true" size="20" name=good_namec[] value="{{$li.good_name}}" /><br />
                      </div></td>
              <td bgcolor="#FFFFFF">{{$li.good_name}}</td>
              <td bgcolor="#FFFFFF"><a href="/product/productlist?other={{$li.good_no}}" target="_blank">{{$li.good_no}}</a><input readonly name="good_no[]" size="10" type="hidden"  value="{{$li.good_no}}" /><input type="hidden" name="goods_id[]" value="{{$li.goods_id}}"></td>
              <td bgcolor="#FFFFFF">
              <input type="hidden" size="3"  name="buyer[]" value="{{$li.buyer}}" />
              <a href="{{$li.businessmanline}}" target=thank><span style="color:#444">{{$li.buyer}}</span></a></td>
              <td bgcolor="#FFFFFF">{{$li.price}}</td>
              <td bgcolor="#FFFFFF">{{$li.nums}}</td>
                {{if $detail.chkflag==1}}
               <td bgcolor="#FFFFFF">{{$li.qualityinNum}}</td>{{/if}}
              <td bgcolor="#FFFFFF">{{$li.total}}</td>
              <td bgcolor="#FFFFFF"><b class="red">
              {{foreach from=$li.storage item=lis key=key}}
              	{{$lis.stock}} {{$lis.storage_name}}  {{$lis.positions}} <br>
              {{/foreach}}
              </b></td>
              
               <td bgcolor="#FFFFFF">{{$li.skucode}}</td>
                <td bgcolor="#FFFFFF">{{$li.skumemo}}</td>
            </tr>
           {{/foreach}}
          </table>
          
          <br>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th colspan="8" class="head1">采购单信息</th>
              </tr>
            </thead>
            <tr>
              <td width="8%" height="40" align="right">发往仓库：</td>
              <td width="7%">
             
              {{foreach from = $storagelist key=key item=li}}
               {{if $detail.cang == $li.id}} {{$li.storagename}}{{/if}}
              {{/foreach}}             </td>
              <td width="7%" align="right">预计入库时间：</td>
              <td width="12%"><span class="kcceng2b">
                {{$detail.daysum}}
              &nbsp;&nbsp;天<span style="color:#cccccc">&nbsp;申请时间{{$detail.opertime}}</span> </span></td>
            </tr>
            <tr>
              <td height="40" align="right">商品费用：</td>
              <td><span class="kcceng2b">
               {{$detail.goodsprice}}
              </span></td>
              <td align="right">运费：</td>
              <td><span class="kcceng2b">
{{$detail.takeprice}}              </span></td>
            </tr><tr>
              <td align="right">其他费用：</td>
              <td width="13%"><span class="kcceng2b">
{{$detail.othermoney}}              </span></td>
              <td align="right" height="40">费用合计：</td>
              <td><span class="kcceng2b">
{{$detail.allmoney}}              </span></td>
            </tr>
            <tr>
              <td align="right">供应商：</td>
              <td height="40" align="left">
                  {{$factory[$detail['made_factory']]}}
                  {{if $detail['made_way']==2 || $detail['made_way']==3}}
                        &nbsp;&nbsp;<span style="color:red;">外采购途径：1688</span>
                  {{/if}}
                  {{if $detail['made_way']==1}}
                        &nbsp;&nbsp;<span style="color:red;">外采购途径：淘宝</span>
                  {{/if}}
                  {{if $detail['made_way']==99}}
                        &nbsp;&nbsp;<span style="color:red;">外采购途径：其他</span>
                  {{/if}}

              </td>
              <td height="40" align="right">总数量：</td>
              <td height="40" align="left">{{$totalnums}}</td>
            </tr>
            <tr>
              <td align="right">采购编号（淘宝订单号）</td>
              <td height="40"  align="left">
              {{if $detail.types1==1}}
              
                
<table width="100%" border="0">
{{foreach from=$detail.tborder item=kdee key=key}}
  <tr>
    <td>{{$kdee}}</td>
    <td>{{$detail.kdname}}</td>
    <td>{{$detail.kdnumber}}</td>
  </tr>
{{/foreach}}
</table>

             
              {{else}}
              
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td> {{$detail.tborder}}</td>
    <td>{{$detail.kdname}}</td>
    <td>{{$detail.tb_kd}}</td>
  </tr>
</table>
              {{/if}}  
              
           
                          </td>
              
               <td align="right">订单号</td>
              <td height="40"  align="left">
              {{$detail.ordersn}}
            </td>
            </tr>
            <tr>
            <td align="right">添加备注：</td>
              <td height="40" colspan="3" align="left"> <span style="padding-left:40px;">
              <!--<input type="button" onClick="addmemo()" value="添加">-->
       
        <div id="memod" style="float:left;">
{{$detail.memo}}        </div>
              </span></td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" colspan="8"><input type="hidden" name="typeid" id="typeid">     <button type="button" onClick="window.location.href='/purchase/purchaselist'" class="btn btn-primary" > 返回 </button>                 </td>
              </tr>
          </table>
       
        </form>
          <!-- 日志信息-->
          {{if $loglist}}
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
              <thead>
              <tr>
                  <th colspan="2" class="head1">质检入库日志信息</th>
              </tr>
              </thead>
          </table>
          <input type="hidden" id="hidden_data" value="" />

          <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;" id="purchase_list">
              <thead>
              <tr>
                  <td bgcolor="#FEFFF1"><b>序号</b></td>
                  <td  bgcolor="#FEFFF1"><strong>商品名称</strong></td>
                  <td bgcolor="#FEFFF1"><strong>商品编号</strong></td>
                  <td bgcolor="#FEFFF1"><strong>商品子SKU</strong></td>
                  <td bgcolor="#FEFFF1"><strong>入库数量</strong></td>
                  <td bgcolor="#FEFFF1"><strong>备注</strong></td>
                  <td bgcolor="#FEFFF1"><strong>质检者</strong></td>
                  <td bgcolor="#FEFFF1"><strong>质检时间</strong></td>
                  <td bgcolor="#FEFFF1"><strong>所在仓位</strong></td>
              </tr>
              </thead>
              {{foreach from=$loglist item=li key=key}}
                  <tr>
                      <td width="32%" bgcolor="#FFFFFF">{{$li.id}}</td>
                      <td bgcolor="#FFFFFF">{{$li.good_name}}</td>
                      <td bgcolor="#FFFFFF">{{$li.good_parent_sku}}</td>
                      <td bgcolor="#FFFFFF">{{$li.good_no}}</td>
                      <td bgcolor="#FFFFFF">{{$li.inStockNum}}</td>
                      <td bgcolor="#FFFFFF">{{$li.memo}}</td>
                      <td bgcolor="#FFFFFF">{{$li.username}}</td>
                      <td bgcolor="#FFFFFF">{{$li.createtime}}</td>
                      <td bgcolor="#FFFFFF">
                          {{if $li.cang eq 1}}
                            一号仓
                          {{elseif $li.cang eq 2}}
                           二号仓
                          {{else}}
                          {{/if}}
                        </td>
                  </tr>
              {{/foreach}}
          </table>
         {{/if}}

          <!-- 日志信息-->
          {{if $statusloglist}}
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
              <thead>
              <tr>
                  <th colspan="2" class="head1">状态变更日志信息</th>
              </tr>
              </thead>
          </table>
          <input type="hidden" id="hidden_data" value="" />

          <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;" id="purchase_list">
              <thead>
              <tr>
                  <td bgcolor="#FEFFF1"><b>序号</b></td>
                  <td  bgcolor="#FEFFF1"><strong>订单编号</strong></td>
                  <td bgcolor="#FEFFF1"><strong>内容</strong></td>
                  <td bgcolor="#FEFFF1"><strong>操作者</strong></td>
                  <td bgcolor="#FEFFF1"><strong>操作时间</strong></td>
              </tr>
              </thead>
              {{foreach from=$statusloglist item=li key=key}}
              <tr>
                  <td width="32%" bgcolor="#FFFFFF">{{$li.id}}</td>
                  <td bgcolor="#FFFFFF">{{$li.goods_code}}</td>
                  <td bgcolor="#FFFFFF">{{$li.details}}</td>
                  <td bgcolor="#FFFFFF">{{$li.username}}</td>
                  <td bgcolor="#FFFFFF">{{$li.createtime}}</td>
              </tr>
              {{/foreach}}
          </table>
          {{/if}}
        
       
      
    </div>
    <!--contentwrapper--> 
    
  </div>
  <!-- centercontent --> 
  
</div>
<!--bodywrapper-->

</body>
</html>